//
//  AddAgentCell.m
//  ActSistant
//
//  Created by Hieu Nguyen Trung on 3/8/13.
//  Copyright (c) 2013 Savvycom. All rights reserved.
//

#import "AddAgentCell.h"

@implementation AddAgentCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UIView *cellBackgroundView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease];
        [cellBackgroundView setBackgroundColor:[UIColor colorWithRed:1 green:170/255.0 blue:86/255.0 alpha:1]];
        [self setSelectedBackgroundView:cellBackgroundView];
    }
    return self;
}

-(id) initWithCoder:(NSCoder *)aDecoder{
    self = [super initWithCoder:aDecoder];
    if (self){
        UIView *cellBackgroundView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease];
        [cellBackgroundView setBackgroundColor:[UIColor colorWithRed:1 green:170/255.0 blue:86/255.0 alpha:1]];
        [self setSelectedBackgroundView:cellBackgroundView];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
    
    if (selected){
        [self.lblTitle setTextColor:[UIColor whiteColor]];
        [self.lblDetail setTextColor:[UIColor whiteColor]];
    }
    else{
        [self.lblDetail setTextColor:[UIColor lightGrayColor]];
        [self.lblTitle setTextColor:[UIColor darkGrayColor]];
    }
}

- (void)dealloc {
    [_lblTitle release];
    [_lblDetail release];
    [super dealloc];
}
@end
